package cn.net.zidian.mvvm.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import com.blankj.utilcode.util.ActivityUtils;

import cn.net.zidian.databinding.FragmentDaibanBinding;
import cn.net.zidian.mvvm.activity.HistoryActivity;

public class DaiBanFragment extends Fragment {

    private FragmentDaibanBinding viewBinding;

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        viewBinding = FragmentDaibanBinding.inflate(LayoutInflater.from(requireContext()));
        return viewBinding.getRoot();
    }

    @Override
    public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        viewBinding.llHistory.setOnClickListener(v -> {
            ActivityUtils.startActivity(HistoryActivity.class);
        });
    }

}
